import {defineStore} from "pinia";
import {ref} from "vue";

export const useServiceRegisterStore = defineStore('serviceRegister', () => {
    let serviceApplicationDataList = ref([]);
    let serviceApplicationSearchData = ref({});
    let addOrUpdateDialog = ref(false);
    let deleteServiceDialog = ref(false);

    function resetServiceApplicationDataList(info) {
        serviceApplicationDataList.value = info
    }

    function resetServiceApplicationSearchData(info) {
        serviceApplicationSearchData.value = info;
    }

    function resetAddOrUpdateDialog(flag) {
        addOrUpdateDialog.value = flag;
    }

    function resetDeleteServiceDialog(flag) {
        deleteServiceDialog.value = flag;
    }

    return { serviceApplicationDataList, resetServiceApplicationDataList, serviceApplicationSearchData, resetServiceApplicationSearchData,
        addOrUpdateDialog, resetAddOrUpdateDialog, deleteServiceDialog, resetDeleteServiceDialog }
})